package cn.wicking.mapper.impl;

import cn.wicking.entity.User;
import cn.wicking.mapper.UserMapper;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.HashMap;
import java.util.List;

/*方式一*/
public class UserMapperImpl implements UserMapper {

    private SqlSessionTemplate sqlSession;

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }

    public List<User> getUserMessage() {
        final UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        return mapper.getUserMessage();
    }

    public int addUser(HashMap<String, Object> map) {
        return 0;
    }

    public int deleteUser(int id) {
        return 0;
    }
}
